// 广告管理接口
import request from '@/utils/request'
// 获取单个Campaign参数
export const findCampaignOne = () => {
  // campaignId, orgId
  return request({
    method: 'get',
    url: `comsumerCampaign/findCampaignOne?campaignId=${campaignId}&orgId=${orgId}`
  })
}
// 获取adgroup所有参数
export const adgroupFindList = (cpid, orgId) => {
  return request({
    method: 'get',
    url: `comsumerAdGroups/findList?campaignId=${cpid}&orgId=${orgId}`
  })
}
// 获取单个adgroup参数
export const adgroupfindOne = (adgroupId, orgId) => {
  return request({
    method: 'get',
    url: `comsumerAdGroups/findOne?adgroupId=${adgroupId}&orgId=${orgId}`
  })
}
// 获取全部keyword参数
export const allKeyWords = (adgroupId, orgId) => {
  return request({
    method: 'get',
    url: `comsumerKeyWords/findList?adGroupId=${adgroupId}&orgId=${orgId}`
  })
}
// 获取单个keyword参数
export const KeyWordsFindOne = (keywordId, orgId) => {
  return request({
    method: 'get',
    url: `comsumerKeyWords/findOne?keywordId=${keywordId}&orgId=${orgId}`
  })
}
// 获取全部否定关键词参数
export const allNegativeKeyWords = (params) => {
  return request({
    method: 'get',
    params,
    url: 'comsumerNegativeKeyWords/findList'
  })
}
// Campaign删除接口
export const Campaignremove = (data) => {
  return request({
    method: 'post',
    url: 'comsumerCampaign/remove',
    data: data
  })
}
// Campaign更新数据
export const Campaignmodify = (data) => {
  return request({
    method: 'post',
    url: 'comsumerCampaign/modify',
    data: data
  })
}
// AdGroups增加
export const AdGroupsadd = (data) => {
  return request({
    method: 'post',
    url: 'comsumerAdGroups/add',
    data: data
  })
}
// AdGroups删除数据
export const AdGroupsremove = (data) => {
  return request({
    method: 'post',
    url: 'comsumerAdGroups/remove',
    data: data
  })
}
// AdGroups更新数据
export const AdGroupssmodify = (data) => {
  return request({
    method: 'post',
    url: 'comsumerAdGroups/modify',
    data: data
  })
}
// keyords增加
export const KeyWordsAdd = (data) => {
  return request({
    method: 'post',
    url: 'comsumerKeyWords/add',
    data: data
  })
}
// NegativeKeyWord增加数据
export const NegativeKeyWordsAdd = (data) => {
  return request({
    method: 'post',
    url: 'comsumerNegativeKeyWords/add',
    data: data
  })
}
// 修改关键词出价
export const KeyWordsAddmodify = (data) => {
  return request({
    method: 'post',
    url: 'comsumerKeyWords/modify',
    data: data
  })
}
// 删除否定关键词
export const NegativeKeyWordsRemove = (data) => {
  return request({
    method: 'post',
    url: 'comsumerNegativeKeyWords/remove',
    data: data
  })
}
// adgroup name是否重名
export const adGroupisEmptyName = (campaignId, orgId, adGroupName) => {
  return request({
    method: 'get',
    url: `comsumerAdGroups/isEmptyName?campaignId=${campaignId}&orgId=${orgId}&adGroupName=${adGroupName}`
  })
}
// 删除全部否定关键词
export const removeAdGrouoId = (data) => {
  return request({
    method: 'post',
    data,
    url: 'comsumerNegativeKeyWords/removeAdGrouoId'
  })
}
// 关键词去重
export const findRepeat = (data) => {
  return request({
    method: 'post',
    data,
    url: 'comsumerKeyWords/findRepeat'
  })
}
// 否定关键词去重
export const nkwfindRepeat = (data) => {
  return request({
    method: 'post',
    data,
    url: 'comsumerNegativeKeyWords/findRepeat'
  })
}
// 关键词进度条
export const comsumerMongofind = (params) => {
  return request({
    method: 'get',
    params,
    url: 'comsumerMongo/mongoKeyword/find'
  })
}
// 否定关键词进度条
export const mongoNegativeKeyword = (params) => {
  return request({
    method: 'get',
    params,
    url: 'comsumerMongo/mongoNegativeKeyword/find'
  })
}
